
// 引入日志记录文件
const {logForSql,logForDefault} = require("../utils/log.config")
const {
    Sequelize,
    DataTypes
} = require('sequelize');
const sequelize = new Sequelize('node_sequelize', 'root', '1234', {
    host: 'localhost',
    dialect: 'mysql',
    /* 选择 'mysql' | 'mariadb' | 'postgres' | 'mssql' 其一 */
    logging: (msg)=>{
        logForSql.info(msg)
    } ,// 记录日志
});

module.exports = {sequelize,DataTypes}
